The invention relates to methods and to a device for forming a prediction value.
In image and video coding, when images of a video are compressed for example, some images in the image sequence are coded without reference to at least parts of other images. This is necessary at the beginning of an image sequence for example because at that time no previously coded image content is available as yet. It is also necessary in the case of groups of images GOPs (GOP—Group Of Pictures) which are intended to be decodable independently of one another.
Image or video coding which does not resort to image contents of an image that has already been coded in the past is referred to as intra coding. Even in the case of images which would be able to access image contents of said type it can be advantageous to perform intra coding if no good time predictor can be found in a reference frame of a previously coded image. This occurs for example at the time of scene changes or discovery of new image contents in the image.
With intra coding, however, already coded image contents of the image that is currently to be coded can be referred to for prediction purposes. This enables a decoder wanting to decode a coded or compressed image sequence to draw upon already decoded image contents and so avoid drift due to errors in decoding.
Different intra prediction directions are defined in a standard ITU H.264/AVC (ITU—International Telecommunications Union, AVC—Advanced Video Coding). FIG. 1 shows this by way of example, where the numbers 0 to 1 and 3 to 8 represent predefinable prediction directions.
FIG. 2 shows an image region composed of 5×5 pixels. In order to determine a position of the respective pixel, a coordinate system has been introduced in FIG. 2: horizontal with the values 0, 1, 2, 3, 4 and vertical with the values a, b, c, d, e. Thus, the pixel in the corner at bottom right has the position e4. In addition FIG. 2 shows a hatched image region and an unhatched image region. The hatched image region comprises only reconstructed pixels, i.e. pixels which have already been coded and decoded and therefore are available in a reconstructed form for the intra coding, such as the pixels a0 to a4, b0, c0, d0 and e0.
In contrast, the unhatched region, in this case embodied as a 4×4 block, describes a prediction image region to which e.g. the intra prediction mode 4, i.e. a diagonal prediction direction—see FIG. 1—is to be applied. The prediction is symbolized in FIG. 2 by small arrows. Thus, for example, a prediction value PRW is implemented for the pixel b1 on the basis of the reconstructed image value a0, i.e. PRW(b1)=W(a0). The image value W of a pixel, like the prediction value also, describes an amplitude value for a luminance and/or chrominance value of the respective pixel. The prediction value is then used for example as a basis for forming a difference in order to determine a differential value RES(.) for further coding of the pixel b1, such as e.g. thisRES(b1)=W(b1)−PRW(b1)=W(b1)−W(a0).
In this way a respective prediction value can be calculated for all image values within the unhatched region.
In a step following the prediction the respective differential image value is quantized and coded. The coded image values result in a coded image data stream. The reconstructed image values are produced following decoding, inverse quantization of the coded image values and addition with the prediction value.
As is evident from FIG. 1 and FIG. 2, all the predictions follow linear trajectories, in FIG. 2, for example, from the reconstructed pixel a0 in a straight line to a pixel e4 that is to be predicted. Textural information that is contained within the image region that is to be predicted and that does not follow this linear prediction rule would only be predicted to an inadequate degree and result in a low compression rate or, as the case may be, poor image quality following the reconstruction.
Two similar coding modes called “line-based interprediction” are described in recently published documents “Description of Video Coding Technology Proposal by Huawei Technologies & Hisilicon Technologies” by H. Yang et al. (2010) and “Description of Video Coding Technology Proposal by Microsoft” by F. Wu et al. (2010). In said modes a weighted averaging of neighbor pixels can be employed for a pixel that is to be predicted.